/* 
 * File:   Problem.h
 * Author: jcrada
 *
 * Created on 19 November 2012, 5:36 PM
 */

#ifndef ECB_PROBLEM_H
#define	ECB_PROBLEM_H

#include <limits>
#include <string>

#include "ecb/base/Function.h"

namespace ecb {

    class Properties;

    class Problem : public Function {
    protected:
        Properties* _properties;

    public:
        Problem(const std::string& id = "F", const std::string& name = "",
                int dimensions = 0, 
                scalar minimum = -std::numeric_limits<scalar>::infinity(), 
                scalar maximum = std::numeric_limits<scalar>::infinity(),
                bool minimization = true);
        virtual ~Problem();

        virtual Properties* properties() const;

        virtual bool isBetter(scalar a, scalar b) const;
//        virtual bool isWorse(scalar a, scalar b) const;
        
        virtual scalar worstObjectiveValue() const;
        

        virtual std::string toString() const;

        virtual std::string toXml() const ;
    };

}

#endif	/* ECB_PROBLEM_H */

